package cn.sjxy.regi.service;

import cn.sjxy.regi.dto.SetmealDto;
import cn.sjxy.regi.pojo.Setmeal;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * ClassName:SetmealService
 * Package:cn.sjxy.regi.service
 * Description:
 *
 * @Date:2022/5/27 20:52
 * @Author:SXW
 */
@Service
public interface SetmealService extends IService<Setmeal> {


    /**
     * 同时在 Dish 表与 setmeal_dish 表中插入数据
     *
     * @param setmealDto
     */
    void saveDishAndSetmealDish(SetmealDto setmealDto);

    /**
     * 同时删除 Dish 表与 setmeal_dish 表中数据
     *
     * @param ids
     */
    void deleteDishAndSetmealDish(List<Long> ids);

    void changeStatus(List<Long> ids, Integer status);

    Page getPage(int page, int pageSize, String name);

    List<Setmeal> getSetmeals(Setmeal setmeal);

    SetmealDto viewBack(Long id);

}
